dom.addBehavior()

Availability 3.0
Description Adds a new event/action pair to the selected element. This function is valid only for the active document.
Arguments event, action, {eventBasedIndex}
The first argument is the JavaScript event handler that should be used to attach the behavior to the element; for example, onClick, onMouseOver, or onLoad.
The second argument is the function call that would be returned by applyBehavior() if the action were added using the Behavior inspector; for example, "MM_popupMsg('Hello World')".
The third argument is the position at which this action should be added. eventBasedIndex is a zero-based index; if two actions already are associated with the specified event, and you specify eventBasedIndex as 1, this action will be executed between the other two. If this argument is omitted, the action is added after all existing actions for the specified event.
Returns Nothing.
Enabler None.